-
Notifications
You must be signed in to change notification settings - Fork 58
fix: recover from cache corruption #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds resilience to handle corrupted shelve cache files by implementing an automatic recovery mechanism that clears corrupted cache files and rebuilds the cache on load failures.
Key Changes:
- Added cache corruption recovery with automatic retry logic in
get_cache() - Implemented
_clear_cache_files()helper to remove shelve-related files on corruption - Added regression test for cache recovery behavior
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| wbdata/version.py | Bumped version from 1.1.0 to 1.1.1 for patch release |
| wbdata/cache.py | Added retry logic to recover from cache corruption by catching pickle/system errors and clearing cache files before rebuild |
| tests/test_cache.py | Added new test verifying cache recovery behavior when corruption is detected |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributes to #78 Signed-off-by: Oliver Sherouse <[email protected]>
65da35b to
6e0a642
Compare
Summary
Testing